import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Choose1 from '../views/Choose1.vue'
import Step1 from '../components/Step1.vue'
import Step2 from '../components/Step2.vue'
import Step3 from '../components/Step3.vue'
import Step4 from '../components/Step4.vue'
import Change from '../views/Change.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path:'/Choose1',
    name:'Choose1',
    component:Choose1,
    children:[
      {
        path:'/Step1',
        name:'Step1',
        component:Step1,
      },
      {
        path:'/Step2',
        name:'Step2',
        component:Step2,
      },
      {
        path:'/Step3',
        name:'Step3',
        component:Step3,
      },
      {
        path:'/Step4',
        name:'Step4',
        component:Step4,
      },
    ]
  },
  {
    path:'/change',
    name:'Change',
    component:Change,
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: function () {
      return import(/* webpackChunkName: "about" */ '../views/About.vue')
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
